package second;

public class Truck {
    private ComputeWeight[] items;
    public Truck(ComputeWeight[] arr) {
        this.items = arr;
    }
    public double computeTotalWeight() {
        double total = 0;
        for(int i = 0; i < items.length; i++) {
            total += items[i].computeWeight();
        }
        return total;
    }
}
